package com.zzyl.nursing.controller.member;

import java.util.List;
import java.util.Map;

import com.zzyl.common.core.domain.AjaxResult;
import com.zzyl.common.core.domain.R;
import com.zzyl.serve.domain.NursingProject;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.zzyl.common.core.controller.BaseController;
import com.zzyl.nursing.service.IMemberNursingProjectService;
import com.zzyl.common.core.page.TableDataInfo;


/**
 * 护理项目Controller
 *
 * @author laoYe
 * @date 2025-10-27
 */
@Slf4j
@RestController
@RequestMapping("/member/orders/project")
@Api(tags = "护理项目相关接口")
public class MemberNursingProjectController extends BaseController {
    @Autowired
    private IMemberNursingProjectService nursingProjectService;


    /**
     * 查询护理项目列表
     */
    @GetMapping("/page")
    @ApiOperation(value = "获取护理项目列表")
    public Map<String, Object> list(NursingProject nursingProject) {
        return nursingProjectService.selectNursingProjectList(nursingProject);
    }


    /**
     * 获取护理项目详细信息
     */
    @GetMapping(value = "/{id}")
    @ApiOperation("获取护理项目详细信息")
    public R<NursingProject> getInfo(@ApiParam(value = "护理项目ID", required = true)
                                     @PathVariable("id") Long id) {

        return R.ok(nursingProjectService.selectNursingProjectById(id));
    }


}
